package com.kate.map.entity;

import lombok.*;

import java.util.Date;
import java.util.List;

/**
 * @author 新梦想.陈超
 * @version 2021.2
 * @Description: {TODO}
 * @date 2023/7/3 下午2:29
 *
 *
 * java中命名规范：驼峰命名    aColumn
 * mysql命名规范：匈牙利命名   A_COLUMN
 */

@Getter
@Setter
@EqualsAndHashCode
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Order {
    private Integer id;
    private Integer userId;
    private Integer number;
    private Date createtime;
    private String note;

    //查询订单同时，查询该订单关联的用户的【所有】信息
    private User associationUser;

    //查询订单同时，查询该订单对应的所有订单详情的所有信息
    private List<OrderDetail> orderDetailList;

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", userId=" + userId +
                ", number=" + number +
                ", createtime=" + createtime +
                ", note='" + note + '\'' +
                '}';
    }
}
